<template>
  <div>
    <Header></Header>
    <router-view></router-view>

    <!-- 在首页，搜索页显示，注册，登录页隐藏 -->
    <Footer v-show="$route.meta.show === true"></Footer>
  </div>
</template>

<script>
import Header from './components/Header'
import Footer from './components/Footer';
import { mapActions } from 'vuex';
export default {
  components: {
    Header,
    Footer,

  },
  methods: {
    ...mapActions('typeNav', ['setActCategoryList']),
  },
  /* 把TypeNav里面获取商品分类 categoryList 数据的方法移到了App.vue根组件中调用，提升了性能优化 */
  async mounted() {
    //await this.$store.dispatch('home/setBannerList')
    await this.setActCategoryList()

  }
}
</script>
<style lang="less" scoped></style>
